<template>
  <ul class="todo-main">
    <transition-group appear name="dh">
      <todoitem v-for="(todo,i) in todoObj" :key="i" :todo="todo"/>
    </transition-group>
  </ul>
</template>

<script>
  import todoitem from './todoitem.vue'
  export default {
      name: 'todomain',
      data(){
        return{ 
          
        }
      },
      props: ['todoObj'],
      components:{
        todoitem
      }
  }
</script>

<style scoped>
  .dh-enter-active {
    transition: all .3s ease;
  }
  .dh-leave-active {
    transition: all .5s cubic-bezier(1.0, 0.5, 0.8, 1.0);
  }
  .dh-enter, .dh-leave-to{
    transform: translateX(10px);
    opacity: 0;
  }
  .todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>